
#include <cstdio>
#include <iostream>

#include "lib.h"

int main(int argc, char* argv[]) {
    if (argc < 2) {
        fprintf(stdout, "Usage: %s a accuracy\n", argv[0]);
        return 0;
    }

    my_float_t a;
    unsigned int accuracy;

    a = std::atof(argv[1]);

    if (argc >= 3) {
        accuracy = std::atoi(argv[2]);
    }
    else {
        accuracy = 6;
    }

    fprintf(stdout, "%.18Lf\n", sqrt(a, accuracy));
    return 0;
}